package com.sftz.modules.minapp.coursedetailshomework.dto;

import lombok.Data;

/**
 * @author   王宏伟
 * @Date	 2018年12月25日 	 
 */
@Data
public class CourseHomeworkDto {

	private Integer id;
	private Integer courseId;
	private String homeworkName;
	private Integer answerNumber;
	private Integer ligthStatus;
	private Integer courseStructureId;
	//判断 0未开始，1开始
	private Integer flagStart;
	//判断 0已过期，1开始
	private Integer flagEnd;
	//未开始0  开始1 已过期2
	private Integer buttonState;

	public Integer getButtonState() {
		if (flagStart == 0) {
			buttonState = 0;
		} else if (flagStart == 1 && flagEnd == 1) {
			buttonState = 1;
		} else if (flagEnd == 0) {
			buttonState = 2;
		}
		return buttonState;
	}
}
